In order to solve the problems of low accuracy and poor generalization of the traditional sensitive information detection methods such as keyword character matching-based method and phrase-level sentiment analysis-based method, a sensitive information detection method based on Attention mechanism-based Embedding from Language Model (A-ELMo) was proposed. Firstly, the quick matched of trie tree was performed to reduce the comparison of useless words significantly, thereby improving the query efficiency greatly. Secondly, an Embedding from Language Model (ELMo) was constructed for context analysis, and the dynamic word vectors were used to fully represent the context characteristics to achieve high scalability. Finally, the attention mechanism was combined to enhance the identification ability of the model for sensitive features, and further improve the detection rate of sensitive information. Experiments were carried out on real datasets composed of multiple network data sources. The results show that the accuracy of the proposed sensitive information detection method is improved by 13.3 percentage points compared with that of the phrase-level sentiment analysis-based method, and the accuracy of the proposed method is improved by 43.5 percentage points compared with that of the keyword matching-based method, verifying that the proposed method has advantages in terms of enhancing identification ability of sensitive features and improving the detection rate of sensitive information.